package com.learn.springmvc4.web;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by xuxiaobao on 2017/8/4.
 */
@RestController
public class HelloController {
    @RequestMapping(value = "/index")
    public Object hello(HttpServletResponse response) {
        Map<Object, Object> map = new HashMap<Object, Object>();
        map.put("hello", "world");
        return map;
    }
}
